<template>
  <div :style="'height:' + height">
    <iframe
      :src="src"
      frameborder="no"
      style="width: 100%; height: 100%"
    />
  </div>
</template>
<script>
import {mapState} from "vuex";

export default {
  props: {
    src: {
      type: String,
      required: true
    },
  },
  computed: {
    ...mapState({
      needTagsView: state => state.settings.tagsView
    }),
    height() {
      return this.needTagsView ? "calc(100vh - 84px)" : "calc(100vh - 50px)";
    }
  },
};
</script>
